package com.zhilianbao.leyaogo.ui.activity.rong;

import android.os.Bundle;
import android.view.KeyEvent;

import com.zhilianbao.leyaogo.R;
import com.zhilianbao.leyaogo.ui.activity.base.BaseOkHttpActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import io.rong.imkit.fragment.ConversationFragment;


/**
 * Created by Android Studio
 * Description: 会话页面
 */
public class ConversationActivity extends BaseOkHttpActivity {

    private static final String TAG = ConversationActivity.class.getSimpleName();

    @Override
    protected int getContentViewLayoutID() {
        return R.layout.activity_conversation;
    }

    @Override
    protected void initViewsAndEvents(Bundle savedInstanceState) {
        initToolbar("与客服会话中");
    }

    @Override
    public void onBackPressed() {
        ConversationFragment fragment = (ConversationFragment) getSupportFragmentManager().findFragmentById(R.id.conversation_id);
        if(!fragment.onBackPressed()) {
            finish();
        }
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        return super.onKeyDown(keyCode, event);
    }
}
